#!/usr/bin/env python

def generate_tensor(d, value):
        if d == 0:
                return value
        else:
                result = []
                for i in range(0, 4):
                        result.append(generate_tensor(d - 1, value))
                return result

def generate_tensor_list(d, value):
        return generate_tensor(d - 1, value)
